package org.andes.kownledge.operator;

import org.andes.base.Bindings;

public class Key extends Term{
	private String type;
	public Key(String type2){
		type=type2;
		
	}
	public Key(String key,Term value){
		this.type=key;
		this.value=value;
		
	}
	public String getType(){
		return type;
	}
	private Term value;
	public void setValue(Term value1){
		this.value=value1;
	}
	public Term getValue(){
		return value;
	}
	@Override
	public Term substBindings(Bindings bindings) {
		Key result=new Key(type);
		Term  theValue=value.substBindings(bindings);
		result.setValue(theValue);
		return result;
	}
	public String toString(){
		return type+":"+value.toString();
	}
	@Override
	public Term renameVariable() {
		Key result=new Key(type);
		Term  theValue=value.renameVariable();
		result.setValue(theValue);
		return result;
	}

}
